import java.util.Random;
import java.util.Scanner;

public class 猜数字 {
    public static void main(String[] args) {
        System.out.println("请猜数（-1退出）");
        Random ra=new Random();
        int b= ra.nextInt(100);
        for (int i = 0; i <=50; i++) {
            Scanner sc=new Scanner(System.in);
            int a = sc.nextInt();

            if(a==b && i==0){
                System.out.println("你真厉害，一次就猜对了");
                break;
            }
            else if(a==-1){
                break;
            }
            else if(a==b && i<4 && i>0){
                    System.out.println("你很聪明，猜对了");
                    break;
                }
            else if(a==b&&i>=4){
                System.out.println("笨蛋，你猜这么多次！");
                break;
            }
            else if(a!=b){
                System.out.println("再猜一次");
            }
            }
        }
    }

